package com.health.controller.front;

import com.health.common.Result;
import com.health.domain.Setmeal;
import com.health.service.SetmealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/setmeal")
@Slf4j
public class SetmealController {

    @Autowired
    private SetmealService setmealService;

    @GetMapping("/getAllSetmeal")
    public Result<List<Setmeal>> list(){
        List<Setmeal> setmeals = setmealService.list();
        return new Result<>(true, "", setmeals);
    }


}
